#pragma once
#include "ScaleformRefCountBase.h"
#include "sfse_common/Types.h"

namespace Scaleform
{
    namespace GFx
    {
        class State : public RefCountBase //<State, Stat_Default_Mem>;
        {
        public:
            enum StateType
            {
                State_None,
                State_Translator,
                State_Log,
                State_ActionControl,
                State_UserEventHandler,
                State_FSCommandHandler,
                State_ExternalInterface,
                State_MultitouchInterface,
                State_VirtualKeyboardInterface,
                State_FileOpener,
                State_URLBuilder,
                State_ImageCreator,
                State_ImageFileHandlerRegistry,
                State_ParseControl,
                State_ProgressHandler,
                State_ImportVisitor,
                State_FontPackParams,
                State_FontLib,
                State_DefaultFontLibName,
                State_FontProvider,
                State_FontMap,
                State_TaskManager,
                State_Clipboard,
                State_TextKeyMap,
                State_IMEManager,
                State_XMLSupport,
                State_ZlibSupport,
                State_FontCompactorParams,
                State_ImagePackerParams,
                State_Audio,
                State_Video,
                State_TestStream,
                State_SharedObject,
                State_SharedObject3,
                State_UrlNavigator,
                State_LocSupport,
                State_AS2Support,
                State_AS3Support
            };

            StateType interfaceType;
        };

        class FileTypeConstants
        {
            enum FileFormatType
            {
                File_Unopened,
                File_Unknown,
                File_SWF,
                File_GFX,
                File_JPEG = 10,
                File_PNG = 11,
                File_GIF = 12,
                File_TGA = 13,
                File_DDS = 14,
                File_HDR = 15,
                File_BMP = 16,
                File_DIB = 17,
                File_PFM = 18,
                File_TIFF = 19,
                File_WAVE = 20,
                File_PVR = 21,
                File_ETC = 22,
                File_SIF = 23,
                File_GXT = 24,
                File_GTX = 25,
                File_GNF = 26,
                File_KTX = 27,
                File_NextAvail,
                File_DDSBC = 65533,
                File_MultiFormat = 65534,
                File_Original = 65535
            };
        };

        class StateBag : public FileTypeConstants
        {
            virtual StateBag* GetStateBagImpl();
            virtual void DerivedClassScalarDeletingDestructor();
            virtual void SetState(State::StateType state, State* pstate);
            virtual State* GetStateAddRef(State::StateType state) const;
            virtual void GetStatesAddRef(State** pstateList, const State::StateType * pstates, u32 count) const;
        };
    }
}
